"""
中间件配置占位（临时桩实现）
"""
from typing import Any, Dict


class RedisStub:
    """redis配置桩"""
    def __init__(self) -> None:
        self.lock_timeout = 30
        self.lock_retries = 3
        self.lock_retry_delay = 0.2


class MiddlewareConfig:
    """中间件配置桩"""
    def __init__(self) -> None:
        # 默认空配置，后续按需扩展
        self.config: Dict[str, Any] = {}
        self.redis = RedisStub()

    def get(self, key: str, default: Any = None) -> Any:
        return self.config.get(key, default)


# 全局单例
middleware_config = MiddlewareConfig()